<template>
    <el-cascader :options="options" :props="cascaderProps"></el-cascader>
</template>

<script setup>
const $api = inject("$api");

const options = ref([]);
const cascaderProps = ref({
    value: 'name',
    label: 'name',
    children: 'cityList'
})

const getProvinceData = async () => {
  const { data } = await $api.system.getProvince();
  options.value = data;
};

onMounted(() => {
  getProvinceData();
});
</script>
